package com.github.prontera.domain;

import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.prontera.domain.enums.YesOrNoEnum;
import com.github.prontera.model.BasicDomain;
import com.github.prontera.util.converter.jackson.OffsetDateTimeToIso8601Serializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * a_activity-活动
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class Activity extends BasicDomain{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 标题照片
	 */
	@ApiModelProperty(value = "标题照片")
    private String headImages;
	/**
	 * 开始时间
	 */
	@ApiModelProperty(value = "开始时间")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime startTime;
	/**
	 * 结束时间
	 */
	@ApiModelProperty(value = "结束时间")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime endTime;
	/**
	 * 原价
	 */
	@ApiModelProperty(value = "原价")
    private BigDecimal baseAmount;
	/**
	 * vip购买价格
	 */
	@ApiModelProperty(value = "vip购买价格")
    private BigDecimal vipAmount;
	/**
	 * 折扣后额度
	 */
	@ApiModelProperty(value = "折扣后额度")
    private BigDecimal discountAmount;
	/**
	 * 状态 ,0:未开始,1:已经开始,2:满员,3:已经结束4:活动暂停(主动)
	 */
	@ApiModelProperty(value = "状态 ,0:未开始,1:已经开始,2:满员,3:已经结束4:活动暂停(主动)")
    private Integer status;
	/**
	 * 可报名人数
	 */
	@ApiModelProperty(value = "可报名人数")
    private Integer applicantsNumber;
	/**
	 * 实际人数
	 */
	@ApiModelProperty(value = "实际人数")
    private Integer actualNumber;
	/**
	 * 实际人数
	 */
	@JsonIgnore
	@ApiModelProperty(value = "实际购买数量")
    private Integer buyNumber;
	/**
	 * 是否购买
	 */
	@ApiModelProperty(value = "是否购买 0:是,1:否")
    private YesOrNoEnum hasBuy;
	/**
	 * 交易保障类型,0:交易保障,1:不保障交易
	 */
	@ApiModelProperty(value = "交易保障类型,0:交易保障,1:不保障交易")
    private Integer transactionType;
	/**
	 * 活动类型 内容暂定
	 */
	@ApiModelProperty(value = "活动类型 内容暂定")
    private Integer type;
	/**
	 * 主题
	 */
	@ApiModelProperty(value = "主题")
    private String activityTheme;
	/**
	 * 活动场地
	 */
	@ApiModelProperty(value = "活动场地")
    private String activitySite;
	/**
	 * 活动场地所在省
	 */
	@ApiModelProperty(value = "活动场地所在省")
    private Long activitySiteProvince;
	/**
	 * 活动场地所在市
	 */
	@ApiModelProperty(value = "活动场地所在市")
    private Long activitySiteCity;
	/**
	 * 场地所在经度
	 */
	@ApiModelProperty(value = "场地所在经度")
    private Double activitySiteLongitude;
	/**
	 * 场地所在纬度
	 */
	@ApiModelProperty(value = "场地所在纬度")
    private Double activitySiteLatitude;
	/**
	 * 简介url( 使用freemarker生成静态html文件)
	 */
	@ApiModelProperty(value = "简介url( 使用freemarker生成静态html文件)")
    private String summaryUrl;
	
	private String content;
	/**
	 * 距离结束时间时差
	 */
	@ApiModelProperty(value = "距离结束时间时差")
    private Long diffEndTime;
	
	/**
	 * 状态 ,0:未开始,1:已经开始,2:满员,3:已经结束4:活动暂停(主动)
	 */
	@ApiModelProperty(value = "状态 ,0:未开始,1:已经开始,2:满员,3:已经结束4:活动暂停(主动)")
    private List<Integer> statusList;
	
	private Boolean hasCurrentActivity;
	
    public Boolean getHasCurrentActivity() {
		return hasCurrentActivity;
	}

	public void setHasCurrentActivity(Boolean hasCurrentActivity) {
		this.hasCurrentActivity = hasCurrentActivity;
	}

	public Long getDiffEndTime() {
		return diffEndTime;
	}

	public List<Integer> getStatusList() {
		return statusList;
	}

	public void setStatusList(List<Integer> statusList) {
		this.statusList = statusList;
	}

	public void setDiffEndTime(Long diffStartTime) {
		this.diffEndTime = diffStartTime;
	}

	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

	public Activity(){
    
    }
    
    public Integer getBuyNumber() {
		return buyNumber;
	}

	public void setBuyNumber(Integer buyNumber) {
		this.buyNumber = buyNumber;
	}

	public YesOrNoEnum getHasBuy() {
		return hasBuy;
	}

	public void setHasBuy(YesOrNoEnum hasBuy) {
		this.hasBuy = hasBuy;
	}

	public String getHeadImages() {
        return this.headImages;
    }
    
    public void setHeadImages(String headImages) {
        this.headImages = headImages;
    }
    public OffsetDateTime getStartTime() {
        return this.startTime;
    }
    
    public void setStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
    }
    public OffsetDateTime getEndTime() {
        return this.endTime;
    }
    
    public void setEndTime(OffsetDateTime endTime) {
        this.endTime = endTime;
    }
    public BigDecimal getBaseAmount() {
        return this.baseAmount;
    }
    
    public void setBaseAmount(BigDecimal baseAmount) {
        this.baseAmount = baseAmount;
    }
    public BigDecimal getVipAmount() {
        return this.vipAmount;
    }
    
    public void setVipAmount(BigDecimal vipAmount) {
        this.vipAmount = vipAmount;
    }
    public BigDecimal getDiscountAmount() {
        return this.discountAmount;
    }
    
    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getApplicantsNumber() {
        return this.applicantsNumber;
    }
    
    public void setApplicantsNumber(Integer applicantsNumber) {
        this.applicantsNumber = applicantsNumber;
    }
    public Integer getActualNumber() {
        return this.actualNumber;
    }
    
    public void setActualNumber(Integer actualNumber) {
        this.actualNumber = actualNumber;
    }
    public Integer getTransactionType() {
        return this.transactionType;
    }
    
    public void setTransactionType(Integer transactionType) {
        this.transactionType = transactionType;
    }
    public Integer getType() {
        return this.type;
    }
    
    public void setType(Integer type) {
        this.type = type;
    }
    public String getActivityTheme() {
        return this.activityTheme;
    }
    
    public void setActivityTheme(String activityTheme) {
        this.activityTheme = activityTheme;
    }
    public String getActivitySite() {
        return this.activitySite;
    }
    
    public void setActivitySite(String activitySite) {
        this.activitySite = activitySite;
    }
    public Long getActivitySiteProvince() {
        return this.activitySiteProvince;
    }
    
    public void setActivitySiteProvince(Long activitySiteProvince) {
        this.activitySiteProvince = activitySiteProvince;
    }
    public Long getActivitySiteCity() {
        return this.activitySiteCity;
    }
    
    public void setActivitySiteCity(Long activitySiteCity) {
        this.activitySiteCity = activitySiteCity;
    }
    public Double getActivitySiteLongitude() {
        return this.activitySiteLongitude;
    }
    
    public void setActivitySiteLongitude(Double activitySiteLongitude) {
        this.activitySiteLongitude = activitySiteLongitude;
    }
    public Double getActivitySiteLatitude() {
        return this.activitySiteLatitude;
    }
    
    public void setActivitySiteLatitude(Double activitySiteLatitude) {
        this.activitySiteLatitude = activitySiteLatitude;
    }
    public String getSummaryUrl() {
        return this.summaryUrl;
    }
    
    public void setSummaryUrl(String summaryUrl) {
        this.summaryUrl = summaryUrl;
    }
    
}
